CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

if (MSVC)
else()
	add_compile_options(-std=c++11)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
endif()

include_directories(${COMN_DIR}/include)


if((MSVC) AND (MSVC_VERSION LESS 1700))
	include_directories(${THIRD_PARTY}/stdint)
endif()


link_directories(${PROJECT_ROOT}/lib)
link_directories(${COMN_DIR}/lib)

include_directories(${OPENCV_INCLUDE})
link_directories(${OPENCV_LIBRARY_DIR})

include_directories(${PROJECT_ROOT}/cvutil)
include_directories(${PROJECT_ROOT}/HeadCounter)

aux_source_directory(. SOURCES)

add_executable(DemoCount ${SOURCES} 
	${PROJECT_ROOT}/HeadCounter/HeadCounter.cpp
	${PROJECT_ROOT}/HeadCounter/DirVideoSource.cpp
	)

if (MSVC)
	SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
endif()

target_link_libraries(DemoCount
	${LIB_PLATFORM}
	${OPENCV_LIBRARIES}
	debug comnd optimized comn	
	)

